-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: remove @metamask/ethjs
package
#29620
base: main
Are you sure you want to change the base?
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
@metamaskbot update-policies |
Removed dependencies detected. Learn more about Socket for GitHub ↗︎ 🚮 Removed packages: npm/@metamask/[email protected], npm/@metamask/[email protected], npm/[email protected] |
@metamask/ethjs
package
Policy update failed. You can review the logs or retry the policy update here |
@metamaskbot update-policies |
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff |
24302eb
to
345f6b1
Compare
345f6b1
to
0f60b67
Compare
@@ -405,19 +404,6 @@ export function getRoundedGasPrice(gasPriceEstimate) { | |||
return getGasPriceInHexWei(gasPriceAsNumber); | |||
} | |||
|
|||
export async function getERC20Balance(token, accountAddress) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed as not in use
@@ -90,15 +89,6 @@ const mockStore = createMockStore([thunk]); | |||
const mockAddress1 = '0xdafea492d9c6733ae3d56b7ed1adb60692c98123'; | |||
const mockNftAddress1 = 'f4831105676a5fc024684d056390b8bc529daf51c7'; | |||
|
|||
jest.mock('./send', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed as getERC20Balance not in use and has been removed from helpers
Description
This PR introduces the following changes:
• Removes the
@metamask/ethjs
package.• Replaces the global variable
global.eth
with the existingglobal.ethereumProvider
(an instance ofStreamProvider
fromweb3-stream-provider
package).• Updates all instances of
getCode
to use a manualsendAsync
call for theeth_getCode
method, as StreamProvider does not include getCode, unlike ethjs.• Substitutes the use of ethjs contracts with Contract instances from the @ethersproject/contracts library.
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist